<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    input{
      /* border: 1px solid black; */
      margin-right: 10px;
    }
  </style>
</head>
<body>
  <div id="app"></div>

  <script src="./js/react.development.js"></script>
  <script src="./js/react-dom.development.js"></script>
  <script src="./js/babel.min.js"></script>
  <script type="text/babel"> 
  let btnContent='保存新的待办事项'
  let f1=function(){
    console.log(11);
  }
  // 创建元素
    let el=(
      <div>
        <div>待办事项列表</div>
        <hr/>
        <input type="text"/>
        <button onClick={f1}>{btnContent}</button>
        <ol>
          <li>吃饭</li>
          <li>睡觉</li>
          <li>打豆豆</li>
        </ol>
      </div>
    )
  // 查找父容器
  let app=document.querySelector('#app')
  let root=ReactDOM.createRoot(app)
  root.render(el)
  </script>
</body>
</html>